package ooday01;

/**
 * Student类的测试类
 */
public class StudentTest {
    public static void main(String[] args) {
        //创建一个学生对象
        Student zg = new Student("张光",
                22,"jsd2407","001");
        //访问成员变量
//        zg.name = "张光";
//        zg.stuId = "001";
//        zg.className = "jsd2407";
//        zg.age=22;
        //调用方法
        zg.study();
        zg.playWith("李林");
        zg.sayHi();
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        //默认值测试
        Student wy = new Student(null,
                0,null,null);
        wy.study();
        wy.playWith("张光");
        wy.sayHi();
        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
        Student student = new Student("吴羽",22,
                "20级计算机科学与技术5班","2005010616");
//        student.name = "吴羽";
//        student.stuId = "2005010616";
//        student.className = "20级计算机科学与技术5班";
//        student.age=22;
        student.study();
        student.playWith("自己");
        student.sayHi();
    }
}
